#ifndef _TASKQUEUE_H
#define _TASKQUEUE_H

#include "03_Mutex.hpp"
#include "04_ConditionVariable.hpp"

#include <list>
//#include <mutex>
//#include <condition_variable>

using std::list;
//using std::mutex;
//using std::condition_variable;

class TaskQueue
{
public:
    TaskQueue(int list_max_size, int list_init_size);
    ~TaskQueue() = default;
    bool empty();
    bool full();
    void push(int);
    int pop();
    int get_list_init_size();

private:
    list<int> _list;
    int _list_max_size;
    int _list_init_size;
    Mutex _mutex;
    ConditionVariable _notfull;
    ConditionVariable _notempty;

};

#endif

